package com.gdcp.travel.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gdcp.travel.bean.Product;
import com.gdcp.travel.dao.ProductMapper;
import com.gdcp.travel.service.ProductService;

@Service
public class ProductServiceImpl implements ProductService {

	@Autowired
	private ProductMapper productMapper;
	
	@Override
	public Product getProductById(long id) {
		Product product = productMapper.selectByPrimaryKey(id);
		return product;
	}

	@Override
	public List<Product> getProductList() {
		// TODO Auto-generated method stub
		List<Product> list = productMapper.selectByExample(null);
		return list;
	}




}
